home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / lib / alib / locale.a < prev    next >
Text File  |  1994-02-01  |  794b  |  45 lines

  1.  
  2.             ;   autoinit if you ever reference LOCALE.LIBRARY
  3.             ;
  4.             ;(c)Copyright1992, Matthew Dillon, All Rights Reserved
  5.             ;
  6.             ;can't use pc-relative between different code sections
  7.             ;   and cannot put string in autoinit section!
  8.             ;
  9.             ;   NOTE: If DICE is unable to open this library
  10.             ;   the autoinit is NOT aborted!
  11.  
  12.             xdef    _LocaleBase
  13.             xref    __AutoFail0
  14.  
  15. _LVOOpenLibrary     equ    -552
  16. _LVOCloseLibrary    equ    -414
  17.  
  18.             section autoinit0,code
  19.  
  20.             moveq.l #0,D0
  21.             lea    locname(pc),A1
  22.             jsr    _LVOOpenLibrary(A6)
  23.             move.l    D0,_LocaleBase(A4)
  24.             ;;;beq       __AutoFail0
  25.             bra    i10
  26. locname         dc.b    'locale.library',0
  27.             ds.w    0
  28. i10
  29.  
  30.             section autoexit0,code
  31.  
  32.             move.l    _LocaleBase(A4),D0
  33.             beq    l10
  34.             move.l    D0,A1
  35.             jsr    _LVOCloseLibrary(A6)
  36. l10
  37.  
  38.  
  39.             section libbss,bss
  40.  
  41. _LocaleBase        ds.l    1
  42.  
  43.             END
  44.  
  45.